from rest_framework import serializers

from apps.movie.models import Movie, MovieTags, Stardom


class MovieTagsModelSerializer(serializers.ModelSerializer):
    class Meta:
        model = MovieTags
        fields = ['value']


class StardomModelSerializer(serializers.ModelSerializer):
    class Meta:
        model = Stardom
        fields = ['name', 'portray']


class MovieDetailInfoModelSerializer(serializers.ModelSerializer):
    tags = MovieTagsModelSerializer(many=True)
    stardom = StardomModelSerializer(many=True)

    class Meta:
        model = Movie
        fields = '__all__'
